#ifndef __DEVICE_TIMER_H
#define __DEVICE_TIMER_H

//Counter.
#define CNT0 0
#define CNT1 1
#define CNT2 2
//Method for reading.
#define LOCK_FOR_CPU 0		//Lock data for cpu reading.
#define READ_LOW 1			//Read low bits only.
#define READ_HIGH 2		//Read high bits only.
#define LOW_HIGH 3			//Read low bits firstly, then hign bits.
//Working ways.
#define WAY0 0
#define WAY1 1
#define WAY2 2
#define WAY3 3
#define WAY4 4
#define WAY5 5
//Data format.
#define BIN 0           	//Binary
#define BCD 1				//BCD

//Counter port.
#define COUNTER_0_PORT 0X40
#define COUNTER_1_PORT 0X41
#define COUNTER_2_PORT 0X42

//Control word port.
#define CONTROL_WORD_PORT 0X43



#include "../lib/stdint.h"
#include "../lib/kernel/io.h"

void set_timer_freq(uint8_t cntl_w, uint16_t data);